// 输出标识符
// ./exam_ids_test < exam_ids.c
#include "str.h"

#include <stdio.h>

int main()
{
    static char set[] =
        "0123456789_"
        "abcdefghijklmnopqrstuvwxyz"
        "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

    char line[10240];

    Fmt_register('a', Str_fmt);
    while (fgets(line, sizeof(line), stdin) != NULL) {
        int i = 1, j;
        while ((i = Str_upto(line, i, 0, &set[10])) > 0) {
            j = Str_many(line, i, 0, set);
            Fmt_print("%a\n", line, i, j);
            i = j;
        }
    }
    return 0;
}

